Skip to content

feat(discovery): ignore-dirs + recursive projects discovery#140

Merged
vreshch merged 1 commit intomasterfrom
feature/discovery-ignore-and-recursive-projects
Apr 19, 2026
Merged

feat(discovery): ignore-dirs + recursive projects discovery#140
vreshch merged 1 commit intomasterfrom
feature/discovery-ignore-and-recursive-projects

Conversation

@vreshch
Copy link
Copy Markdown
Contributor

@vreshch vreshch commented Apr 17, 2026

Summary

Two follow-ups to the config-defaults work (PRs #135, #138):

Agents (scanner):

  • src/discovery/scanner.ts — added IGNORE_DIRS set (node_modules, .git, .github, .github-private, .claude, dist, build, .next, coverage, .turbo, .cache) and skip them in getAllFiles. Pointing a discovery dir at a repo with dependencies no longer picks up ghost agents shipped inside packages or checked into build output.

Projects (discovery):

  • src/projects/projects.tsdiscoverProjects now accepts string | string[], walks recursively (depth cap 5), stops descending once it finds a .git dir (repo boundary), and skips the same ignore set. Old one-level behavior is gone.
  • src/commands/projects.tsagentage projects discover with no path now reads getProjectsDirs(loadConfig()) instead of defaulting to cwd. Single-root setups in projects.default drive the walk.

Unblocks: pointing projects.default at ~/projects finds nested repos like agentage/cli, agentage/web, agents automatically.

Test plan

  • npm run verify — 512 tests pass (5 new: scanner IGNORE_DIRS, projects recursive walk, projects ignore set, array-of-roots dedupe, repo-boundary stop; 2 existing projects cmd tests updated for new signature).
  • Manual: agentage projects discover (no args) on the dev machine — confirm it walks projects.default and finds repos without cwd-dependent behaviour.
  • Manual: agentage status --set-default /home/vreshch/projects/agents/plugins then agentage agents --refresh — confirm no ghost agents from node_modules.

Agents:
- scanner.getAllFiles skips IGNORE_DIRS (node_modules, .git, .github,
  .github-private, .claude, dist, build, .next, coverage, .turbo, .cache)
  so pointing a discovery dir at a repo with deps no longer picks up
  ghost agents shipped by packages or checked into build output.

Projects:
- discoverProjects now takes a single root or an array; walks
  recursively (max depth 5); skips the same ignore set (plus the
  implicit .git match); stops descending once a .git dir is found
  (each repo is a discovery boundary).
- `agentage projects discover` with no path now reads
  getProjectsDirs(config) instead of defaulting to cwd — so
  `projects.default` + `projects.additional` drives the walk.

Unblocks: pointing at /home/user/projects finds nested repos like
agentage/cli and agentage/web without adding each one manually.
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 17, 2026

🎉 PR Validation ✅ PASSED

Commit: fcfe0d75090312fb1c55540b738616c4bd3d6878
Branch: feature/discovery-ignore-and-recursive-projects

Checks:

  • ✅ Release guard (no version/changelog changes)
  • ✅ Dependencies installed
  • ✅ Type check passed
  • ✅ Linting passed
  • ✅ Format check passed
  • ✅ Tests + coverage passed
  • ✅ Build successful

Ready to merge!


🔗 View workflow run
⏰ Generated at: 2026-04-17T23:24:13.474Z

@vreshch vreshch merged commit 8618a71 into master Apr 19, 2026
1 check passed
@vreshch vreshch deleted the feature/discovery-ignore-and-recursive-projects branch April 19, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant